<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-touch-fullscreen" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="msapplication-tap-highlight" content="no"/>
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,minimum-scale=1"/>
    <title>我的商城</title>
    <link rel="stylesheet" type="text/css" href="/wap/e_tpl/css/base.css">
    <link rel="stylesheet" type="text/css" href="/wap/e_tpl/css/nctouch_member.css">
    <link rel="stylesheet" type="text/css" href="/wap/e_tpl/css/new.css">
    <link rel="stylesheet" type="text/css" href="/wap/css/font-awesome.min.css">
    <style>
        #header { height: 1.95rem; } .header-wrap { margin-top: 0; }
    </style>
</head>
<body>
<header id="header" class="transparent">
    <div class="header-wrap">
        <div class="header-l" style="width: auto;">
            <?php
                $user_agent = $_SERVER['HTTP_USER_AGENT'];
                //只有是微信访问的情况下，以下设置才生效
                if (strpos($user_agent, 'MicroMessenger') === false) {
                    ?>
                    <a id="logoutbtn" href="javascript:void(0);" style="width:auto;font-size:14px;color:#fff;">注销</a>
                    <?php
                }
            ?>
        </div>

        <div class="header-title">
            <h1>我的商城</h1>
        </div>
        <div class="header-r"><a id="header-nav" href="javascript:void(0);"><i class="more"></i><sup></sup></a></div>
    </div>
    <div class="nctouch-nav-layout">
        <div class="nctouch-nav-menu"><span class="arrow"></span>
            <ul>
                <li><a href="/wap"><i class="home"></i>首页</a></li>
                <li><a href="/wap/tmpl/search.php"><i class="search"></i>搜索</a></li>
                <li><a href="../product_first_categroy.php"><i class="categroy"></i>分类</a></li>
                <li><a href="../cart_list.php"><i class="cart"></i>购物车<sup></sup></a></li>
            </ul>
        </div>
    </div>
</header>
<div class="scroller-body">
    <div class="scroller-box">
        <div class="member-top">

        </div>
        <div class="member-center">
            <dl class="mt5">
                <dt><a href="order_list.php">
                        <h3><i class="mc-01"></i>我的订单</h3>
                        <h5>查看全部订单<i class="arrow-r"></i></h5>
                    </a></dt>
                <dd>
                    <ul id="order_ul">
                    </ul>
                </dd>
            </dl>
            <dl class="mt5">
                <dt><a href="member_asset.php">
                        <h3><i class="mc-02"></i>我的财产</h3>
                        <h5>查看全部财产<i class="arrow-r"></i></h5>
                    </a></dt>
                <dd>
                    <ul id="asset_ul">
                    </ul>
                </dd>
            </dl>
            <dl class="mt5">
                <dt><a href="address_list.html">
                        <h3><i class="mc-03"></i>收货地址管理</h3>
                        <h5><i class="arrow-r"></i></h5>
                    </a></dt>
            </dl>
            <dl style="border-top:solid 0.05rem #eee">
                <dt>
                    <a href="member_mobile_bind.php">
                        <h3><i class="mc-05"></i>绑定手机
                        </h3>
                        <h5><i class="arrow-r"></i></h5>
                    </a></dt>

            </dl>
            <dl style="border-top: solid 0.05rem #EEE;">
                <dt><a href="profile.php">
                        <h3><i class="mc-04"></i>个人资料
                        </h3>
                        <h5><i class="arrow-r"></i></h5>
                    </a></dt>
            </dl>
            <dl style="border-top:solid 0.05rem #eee">
                <dt>
                    <a href="safe.php">
                        <h3><i class="mc-05"></i>账号安全
                        </h3>
                        <h5><i class="arrow-r"></i></h5>
                    </a>
                </dt>
            </dl>
            <dl style="border-top:solid 0.05rem #eee">
                <dt>
                    <a href="favorites.html">
                        <h3>收藏列表
                        </h3>
                        <h5><i class="arrow-r"></i></h5>
                    </a>
                </dt>
            </dl>


            <?php
                if (dis_open()) {
                    $proxy = Model()->table('proxy')->where(array('member_id' => $minfo['member_id']))->find();
                    if (!$proxy) {
                        $proxy = [];
                    }
                    $link = null;
                    if (count($proxy) && $proxy['is_buyer'] == 0) {
                        $link = 'distribute_center.php';
                        $text = "分销中心";
                    } else if (count($proxy) && $proxy['is_buyer'] == 1) {
                        $parent = new Distribute($proxy['parent_id']);
                        $config = include $_SERVER['DOCUMENT_ROOT'] . '/distribute/include/config.php';
                        if ($parent->getLevel() < $config['levels'] && !$parent->isSpecial()) {
                            $link = 'distribute_center.php?action=apply';
                            $text = '申请成为分销商';
                        }
                    } else {
                        $link = 'distribute_center.php?action=apply';
                        $text = '申请成为分销商';
                    }
                    if ($link != null) {
                        ?>
                        <dl style="border-top: solid 0.05rem #EEE;">

                            <dt><a href="<?php echo $link ?>">
                                    <h3><i class="fa mc-06"></i><?php echo $text; ?>
                                    </h3>
                                    <h5><i class="arrow-r"></i></h5>
                                </a></dt>
                        </dl>


                        <?php
                    }
                }
            ?>
        </div>
    </div>
    <footer id="footer"></footer>
</div>
<script type="text/javascript" src="/wap/e_tpl/js/config.js"></script>
<script type="text/javascript" src="/wap/e_tpl/js/zepto.min.js"></script>
<script type="text/javascript" src="/wap/e_tpl/js/common.js"></script>
<script type="text/javascript" src="/wap/e_tpl/js/tmpl/footer.js"></script>
<script type="text/javascript" src="/wap/e_tpl/js/tmpl/member.js"></script>

</body>
</html>